package com.augurit.gzcgwsp.smartformCsdlwj.dao;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.augurit.common.base.dao.BaseDao;
import com.augurit.gzcgwsp.smartformCsdlwj.entity.YwSrCsdlwj;

/**
 * 道路挖掘 目前这个类，只有与方欣的数据交换用到
 * @author Administrator
 *
 */

@Repository
public class YwSrCsdlwjDao extends SmartformBaseDao<YwSrCsdlwj, Long> {

	public YwSrCsdlwj getEntity(Long id) {
		Session session=getSession();
		Criteria cri=session.createCriteria(YwSrCsdlwj.class);
		cri.add(Restrictions.eq("id", id));
		if(cri.list()!=null && cri.list().size()>0){
			return (YwSrCsdlwj) cri.list().get(0);
		}
		return null;
	}
}